<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <p id="pid"></p>
    <script>
        //return后面不跟任何语句，return后面的语句不执行
        function demo(a,b) {
           if(a>b){
               return "a比较大";
           }else{
               return "b比较大";
           }

        }
       //调用方法的执行
        var vl=demo(100,20);
        document.getElementById("pid").innerHTML=demo(100,20);
        alert(vl);
    </script>
</body>
</html>